<div class="container editRoleContainer">
	<div class="panel panel-default">
		<div class="panel-body">
			<span class="glyphicon glyphicon-user">&nbsp;管理员管理&nbsp;</span> <span
				class="glyphicon glyphicon-chevron-right">&nbsp;查看角色信息&nbsp;</span>
			<span class="glyphicon glyphicon-chevron-right">&nbsp;修改角色信息&nbsp;</span>
			<a href="javascript:window.history.go(-1);">返回</a>
		</div>
	</div>

	<form role="form" class="form-horizontal" name="editRoleForm">
		<div class="form-group"
		 ng-class="{'has-error':editRoleForm.username.$invalid && editRoleForm.username.$dirty}">
			<label for="username" class="control-label col-sm-3">角色名称：</label>
			<div class="col-sm-3">
				<input type="text" class="form-control" name="username"
					id="username"ng-model="name"
					 disabled/>
			</div>
		</div>
		<div class="form-group" 
		ng-class="{'has-error':editRoleForm.description.$invalid && editRoleForm.description.$dirty}">
			<label for="description" class="control-label col-sm-3">角色描述：</label>
			<div class="col-sm-3">
				<input type="text" class="form-control" id="description" name="description"
					placeholder="请输入角色描述" ng-model="description"
					ng-keyup="clickEnter($event)" ng-required="true" ng-maxlength="150"
					ng-pattern="/^[0-9a-zA-Z\u4e00-\u9fa5]*$/"/>
			</div>
			<div class="col-sm-4">
				<div class="alert alert-danger help-block"
					ng-show="editRoleForm.description.$error.pattern">不能存在特殊字符！</div>
			</div>
			<div class="col-sm-4">
				<div class="alert alert-danger help-block"
					ng-show="editRoleForm.description.$error.required && editRoleForm.description.$dirty">角色描述不能为空！</div>
			</div>
			<div class="col-sm-4">
				<div class="alert alert-danger help-block"
					ng-show="editRoleForm.description.$error.maxlength">最多输入150字符！</div>
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-offset-3 col-sm-3">
				<button type="button" class="btn btn-primary"
					ng-disabled="editRoleForm.$invalid" ng-click="updateRole()">保存
				</button>
			</div>
		</div>
	</form>
</div>